Skip to content

refactor(napari): use the glasbey package for label LUTs#39

Merged
lguerard merged 1 commit into
mainfrom
refactor/napari-glasbey-pkg
Jun 25, 2026
Merged

refactor(napari): use the glasbey package for label LUTs#39
lguerard merged 1 commit into
mainfrom
refactor/napari-glasbey-pkg

Conversation

@lguerard

Copy link
Copy Markdown
Contributor

Per the napari glasbey gallery: drop the custom colorcet helper, build the palette with glasbey.create_palette(256, lightness_bounds=(40,100)) (biased lighter for the dark canvas) and pass the list straight to add_labels(colormap=...).

  • No new function — inlined.
  • Toggle with the glasbey arg (default True); guarded so a missing package falls back to napari's default.
  • napari extra dep: colorcetglasbey.

🤖 Generated with Claude Code

Drop the custom colorcet/CyclicLabelColormap helper; instead build the
palette with glasbey.create_palette (the approach from napari's gallery)
and hand the list straight to add_labels(colormap=...). Lightness biased
up so colours read on the dark canvas. Toggle via the `glasbey` arg.
Swap the napari extra dep colorcet -> glasbey.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@lguerard lguerard merged commit ee348d8 into main Jun 25, 2026
2 checks passed
@lguerard lguerard deleted the refactor/napari-glasbey-pkg branch June 25, 2026 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant